'use strict';
const db=uniCloud.database()
exports.main = async (event, context) => {
	//event为客户端上传的参数
	const {
		question_id
	}=event;
	
	if(question_id==null){
		return	{
			code:400,
			msg: 'question_id参数有误'
		};
	}
	
	await db.collection('questions').doc(question_id).remove()
	//返回数据给客户端
	return {
		code:200,
		msg: '数据删除成功'
	}
};

